﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Skipper_Connector
{
    public partial class PassWord : Form
    {
        public bool IsOk {get; private set; }
        public PassWord()
        {
            InitializeComponent();
            IsOk = false;
        }
        private bool CheckPassward()
        {
            if (PasswordText.Text == "orange")
                return true;
            return false;
        }

        private void PasswordText_KeyDown(object sender, KeyEventArgs e)
        {
            if(e.KeyCode==Keys.Enter)
            {
                if(CheckPassward())
                {
                    this.Hide();
                    Form2 f = new Form2();
                    f.ShowDialog();
                    if (f.DialogResult == DialogResult.Cancel)
                        IsOk = true;
                }
            }
        }
    }
}
